import yagmail
import logging
def log_cat():
    logging.basicConfig(level=logging.DEBUG,format='%(name)s_%(levelno)s_%(pathname)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])
def fend_mail(a):
    mail=yagmail.SMTP(user='2857756581@qq.com',password='aqjrkrthryuedfhh',host='smtp.qq.com')
    mail.send(to='2857756581@qq.com',subject='测试标题',contents='测试内容',attachments=a)